package com.hoshiicloud.user.service.company;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.hoshiicloud.common.exception.ServiceException;
import com.hoshiicloud.common.rpc.Response;
import com.hoshiicloud.user.entity.company.OrganizationType;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 机构类型 服务类
 * </p>
 *
 * @author WGJ
 * @since 2019-04-22
 */
public interface IOrganizationTypeService extends IService<OrganizationType> {

    /**
     * 根据id获取
     * @param id ID
     * @return OrganizationType
     */
    OrganizationType getById(Long id);

    /**
     * 根据一组id获取
     * @param ids id组
     * @return List<OrganizationType>
     */
    List<OrganizationType> getByIds(List<Long> ids);

    /**
     * 保存
     * @param entity 实体对象
     * @return Long
     */
    Long insert(OrganizationType entity) throws ServiceException;

    /**
     * 修改
     * @param entity 实体对象
     * @return Long
     */
    Long update(OrganizationType entity) throws ServiceException;

    /**
     * 查询
     * @param entity 查询参数实体
     * @return IPage<OrganizationType>
     */
    IPage<OrganizationType> List(OrganizationType entity);

    /**
     * 删除
     * @param id ID
     * @return boolean
     */
    boolean delete(Long id) throws ServiceException;

    @Override
    boolean updateById(OrganizationType entity);

    IPage<OrganizationType> getPage(IPage<OrganizationType> page, QueryWrapper<OrganizationType> queryWrapper, String key);

    List<OrganizationType> selectAll(@Param("orgType") Integer orgType);
}
